#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <signal.h>

#include <coap2/coap.h>

#ifndef _COAP_IMPLEMENT_h_
#define _COAP_IMPLEMENT_h_


/*
@descryption:
  create 

@Author: jiang_c
@Datetime: Mon Dec 2 2024
*/
coap_context_t * 
create_context();

/*
@descryption:
  coap configure initial

@Author: jiang_c
@Datetime: Mon Dec 2 2024
*/
void 
coap_startup(void);

/*
@descryption:
  bind server address

@Author: jiang_c
@Datetime: Mon Dec 2 2024
*/
void
bind_server_addr(const char* Addr, 
                const char* port, 
                coap_context_t *ctx);

/*
@descryption:
  initial coap resources

@Author: jiang_c
@Datetime: Mon Dec 2 2024
*/
void
init_resources(coap_context_t *ctx);

/*
@descryption:
  coap enter event loop

@Author: jiang_c
@Datetime: Mon Dec 2 2024
*/
int 
event_loop(coap_context_t *ctx);

#endif
